<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/25 0025
 * Time: 下午 5:18
 */

namespace app\home\controller;


use think\Db;

class Yingzhang extends HomeBase
{
    //印章管控
    public function yinzhanginfo(){

		$uid=input('uid');
        $cxcode=input('cxcode');
        if($uid){
            $map=array();
            $sfid=Db::name('Member')->where('id',$uid)->value('sfid');
            if($cxcode){
                $map[]=array('cxcode','=',$cxcode);
            }else{
                $map[]=array('sfid','=',$sfid);
            }
            $info=Db::name('Yinzhang')->where($map)->select();
            if($info){
                foreach ($info as $key=>$value){
                    $info[$key]['lrtime']=time_nianyueri($value['lrtime']);
                    $info[$key]['sqtime']=time_nianyueri($value['sqtime']);
                }
                $datas['status']=1;
                $datas['info']=$info;
            }else{
                $datas['status']=0;
                $datas['info']='无数据';
            }



        }else{
            $datas['status']=0;
            $datas['info']='无参数！';
        }
        return json($datas);
    }
}